package com.bauer.module.common.response;

import com.bauer.module.common.error.ErrorCode;

/**
 * @program: clock
 * @description:
 * @author: bauer weo
 * @create: 2019-09-16 21:22
 */
public class ApiResponse<T> {

    private String code;
    private String message;
    private T result;

    public ApiResponse() {
    }

    public ApiResponse(ErrorCode errorCode, T result) {
        this.result = result;
        this.code = errorCode.getCode();
        this.message = errorCode.getMessage();
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getResult() {
        return result;
    }

    public void setResult(T result) {
        this.result = result;
    }
}
